import request from "@/utils/request"
import type { loginResponseModel, UserInfoResponseModel } from "./model/loginModel";

enum Api{
  Login="/admin/acl/index/login",
  UserInfo="/admin/acl/index/info",
  Logout="/admin/acl/index/logout",

}
// 登录
export const LoginApi=(username:string,password:string)=>{
  return request.post<any,loginResponseModel>(Api.Login,{username,password})
}
// 获取用户信息
export const GetUserInfoApi=()=>{
  return request.get<any,UserInfoResponseModel>(Api.UserInfo)
}
// 退出登录

export const LogoutApi=()=>{
  return request.post(Api.Logout)
}